How to: Customize the Mobile Inventory Lookups
Some amount of customization can be achieved on the Mobile Inventory Lookups.
In the demo database, lookups can be found on the LOOKUP MENU card under: Departments - LS Retail - InStore Management - Administration - Inventory Menus
When creating a lookup in one of the menu for the Mobile Inventory device, you define the Card View Code of the lookup. Customizations will be done at that level.
Web service responses for the Mobile Inventory solution are created by codeunit 10012800 WS IM Request.
In the Development Environment, open the codeunit 10012800. The function IMGetItemCard01 is creating the data for the response for the Item lookup. Vendor Lookup and Customer Lookup are using their own function.
Once inside the IMGetItemCard01 function, look for the “CASE pView” and go to the one you want to modified (‘01’, ‘02’, ‘03’)
The lookup is built of an array of lines with left and right values. The left value will be a text variable with the description. The right value will be the actual data coming from the record.
User case: adding the unit price to the lookup
Below is how a new field is added to the Item lookup for card view code 1. This example is a simple one, displaying other information may require additional or more complex coding.
Go to the bottom of the CASE pView for ´01´
Create a new line in my array of information that will be displayed on the screen:
lLineNo := lLineNo + 1;
Create a new description for the information to be displayed by creating a text variable for the new left line in the array.
lLeftLineArray[lLineNo] := Text’xxxx’; (in this case, Text413 with the value Item Price)
Assign the field of the record you want to display to the new right line in the array.
lRightLineArray[lLineNo] :=FORMAT(lItem.”Unit Price”);
Compile and save.
Once the Business Centralservice and the mobile application are restarted, the lookup should display the new information.